package com.exercise.widgets.dialog.dialogfragment

import android.app.Dialog
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.DialogFragment
import com.exercise.widgets.R

class CustomDialogFragment : DialogFragment() {
    override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {

        return activity?.let {
            val builder = AlertDialog.Builder(it)
            val inflater = requireActivity().layoutInflater
            builder.setView(R.layout.dialog_signin)
                .setPositiveButton("Sign in") { dialog, id ->

                }
                .setNegativeButton("Cancel") { dialog, id ->

                }
            builder.create()
        } ?: throw IllegalStateException("activity cannot be null")
    }
}